import request from '@/utils/request'



//查询列表
export function getKeYanList(params) {
    return request({
        url: '/kyDirectory/build/directory/tree',
        method: 'get',
        params,
        jy: true
    })
}
//查询文件列表
export function getDoucountList(params) {
    return request({
        url: '/kyDirectory/list',
        method: 'get',
        params,
        jy: true
    })
}
//构建单节点目录树
export function getTreeShuaxin(params) {
    return request({
        url: '/kyDirectory/build/single/directory/tree',
        method: 'get',
        params,
        jy: true
    })
}
export function getDoucoument(params) {
    return request({
        url: '/kyFile/list',
        method: 'get',
        params,
        jy: true
    })
}
//批量更改科研资料库目录表数据
export function kyDirectory(params) {
    return request({
        url: '/kyDirectory/put/ids',
        method: 'put',
        params,
        jy: true
    })
}
//更改科研资料库目录表数据
export function editKyDirectory(params) {
    return request({
        url: '/kyDirectory/edit',
        method: 'put',
        params,
        jy: true
    })
}
//新增科研资料库目录表数据
export function addkyDirectory(data) {
    return request({
        url: '/kyDirectory/add',
        method: 'POST',
        data,
        jy: true
    })
}

//删除科研资料库文件表数据
export function deletekyDirectory(id) {
    return request({
        url: `/kyFile/del/${id}`,
        method: 'DELETE',
        jy: true
    })
}
//删除科研资料库目录表数据
export function deleteDocuments(id, isAdmin) {
    return request({
        url: `/kyDirectory/del/${id}/${isAdmin}`,
        method: 'DELETE',
        jy: true
    })
}

//编辑科研资料库目录表数据
export function moveyDirectory(operationType, data) {
    return request({
        url: `/kyDirectory/edit/${operationType}`,
        method: 'put',
        data,
        jy: true
    })
}
//编辑科研资料库wenjian表数据
export function movewenjian(data) {
    return request({
        url: `/kyFile/edit`,
        method: 'put',
        data,
        jy: true
    })
}
// 新增科研资料库文件表数据
export function addDocument(isAdmin, data) {
    return request({
        url: `/kyFile/add/${isAdmin}`,
        method: 'post',
        data,
        jy: true
    })
}
// 下载zip
export function dowLoadZip(data) {
    return request({
        url: `/kyDirectory/download/zip`,
        method: 'post',
        data,
        // responseType: "blob",
        jy: true
    })
}
// ch寻单条目录
export function lookOne(id) {
    return request({
        url: `/kyDirectory/get/${id}`,
        method: 'get',
        jy: true
    })
}
//科研业务专项资金管理表模块
//批量删除科研业务专项资金管理表数据
export function deleteAllMoney(params) {
    return request({
        url: `/kyFundManagement/del/ids`,
        method: 'delete',
        params,
        jy: true
    })
}
//删除科研业务专项资金管理表数据
export function deleteMoney(id) {
    return request({
        url: `/kyFundManagement/del/${id}`,
        method: 'delete',
        jy: true
    })
}
//获取所有科研业务业务专项
export function getAllkyFundManagement(params) {
    return request({
        url: '/kyFundManagement/query/all',
        method: 'get',
        params,
        jy: true
    })
}
//查询科研业务专项资金管理表列表
export function getAllkyFundManagementList(params) {
    return request({
        url: '/kyFundManagement/list',
        method: 'get',
        params,
        jy: true
    })
}
// 新增科研业务专项资金管理表数据
export function addMoney(data) {
    return request({
        url: '/kyFundManagement/add',
        method: 'post',
        data,
        jy: true
    })
}
//编辑科研业务专项资金管理表数据
export function editMoney(data) {
    return request({
        url: '/kyFundManagement/edit',
        method: 'put',
        data,
        jy: true
    })
}
//查询科研业务专项资金管理明细表列表
export function getManagementList(params) {
    return request({
        url: '/kyFundManagementDetails/list',
        method: 'get',
        params,
        jy: true
    })
}
//新增科研业务专项资金管理明细表数据
export function addManagement(data) {
    return request({
        url: '/kyFundManagementDetails/add',
        method: 'post',
        data,
        jy: true
    })
}
//查询公告表列表——科研专项资金管理
export function getyiduList(params) {
    return request({
        url: '/kyFundManagement/query/management/list',
        method: 'get',
        params,
        jy: true
    })
}

//公告——标记已读-未读
export function biaoJI(id, type) {
    return request({
        url: `/kyFundManagement/change/is/read/${id}/${type}`,
        method: 'get',
        jy: true
    })
}

//科研专项柱状图
export function getcharts(params) {
    return request({
        url: '/kyFundManagement/query/management/bar/chart',
        method: 'get',
        params,
        jy: true
    })
}
//科研专项折线柱状图
export function getzheCharts(params) {
    return request({
        url: '/kyFundManagement/query/management/discounting/bar/graph',
        method: 'get',
        params,
        jy: true
    })
}
//科研人员分页接口
export function getPersonList(params) {
    return request({
        url: '/ky/person/management/page',
        method: 'get',
        params,
        jy: true
    })
}

//新增科研renyuan
export function savePerson(data) {
    return request({
        url: '/ky/person/management/savePerson',
        method: 'post',
        data,
        jy: true
    })
}
//快捷打印  打印
export function printDocument(data) {
    return request({
        url: '/kyDirectory/synthesis/pdf',
        method: 'post',
        data,
        jy: true
    })
}

//科研人员的岗位列表
export function getPelpleMessages(params) {
    return request({
        url: '/xm/project/info/getAllProject',
        method: 'get',
        params,
        jy: true
    })
}
//根据用户ID查询用户信息
export function getPelples(userId) {
    return request({
        url: `/user/getUserInfoByUserId/${userId}`,
        method: 'get',
        jy: true
    })
}
//科研人员的岗位列表
export function getPeopleList(params) {
    return request({
        url: '/ky/person/management/getPosition',
        method: 'get',
        params,
        jy: true
    })
}
//科研删除人员
export function deletePeople(personIds) {
    return request({
        url: `/ky/person/management/deletePerson/${personIds}`,
        method: 'delete',
        jy: true
    })
}
//修改科研人员信息
export function editPerson(data) {
    return request({
        url: '/ky/person/management/updatePerson',
        method: 'put',
        data,
        jy: true
    })
}
//科研开放申报分页接口
export function getShenBao(params) {
    return request({
        url: '/ky/open/examine/page',
        method: 'get',
        params,
        jy: true
    })
}

//新增开放申报信息
export function addShenBao(data) {
    return request({
        url: '/ky/open/examine/saveReport',
        method: 'post',
        data,
        jy: true
    })
}
//修改开放申报信息
export function editShenBao(data) {
    return request({
        url: '/ky/open/examine/updateReport',
        method: 'put',
        data,
        jy: true
    })
}
//撤销开放申报信息
export function returnShenBao(data) {
    return request({
        url: '/ky/open/examine/cancelReport',
        method: 'post',
        data,
        jy: true
    })
}
//撤销撤销申报
export function chexiaoShenBao(examineId) {
    return request({
        url: `/ky/person/examine/cancelExamine/${examineId}`,
        method: 'put',
        jy: true
    })
}
//删除申报
export function deleteShenBao(ids) {
    return request({
        url: `/ky/open/examine/deleteReport/${ids}`,
        method: 'delete',
        jy: true
    })
}
//下载zip
export function downLoadmulu(data) {
    return request({
        url: `/kyDirectory/check/download/zip`,
        method: 'post',
        data,
        jy: true
    })
}

//获取当前时间是否处于开始申报时间
export function getShenBaoTime(params) {
    return request({
        url: '/ky/open/examine/getStartedReport',
        method: 'get',
        params,
        jy: true
    })
}
//审核分页接口
export function getTianBao(params) {
    return request({
        url: '/ky/person/examine/page',
        method: 'get',
        params,
        jy: true
    })
}
//新增科研成果申报
export function addTianBao(data) {
    return request({
        url: '/ky/person/examine/saveExamine',
        method: 'post',
        data,
        jy: true
    })
}

//管理员审核分页接口
export function getGuanLi(params) {
    return request({
        url: '/ky/person/examine/approvePage',
        method: 'get',
        params,
        jy: true
    })
}
//管理员考核年度分页接口
export function getOpenPage(params) {
    return request({
        url: '/ky/person/examine/openPage',
        method: 'get',
        params,
        jy: true
    })
}

//通过审核
export function tongGuanLi(data) {
    return request({
        url: '/ky/person/examine/approveYes',
        method: 'post',
        data,
        jy: true
    })
}
//驳回审核
export function returnGuanLi(data) {
    return request({
        url: '/ky/person/examine/approveNo',
        method: 'post',
        data,
        jy: true
    })
}

//查看并同步个人成果信息
export function getDocumentInfo(params) {
    return request({
        url: '/ky/person/management/getDocumentInfo',
        method: 'get',
        params,
        jy: true
    })
}

//查看并同步个人成果信息
export function getDetails(params) {
    return request({
        url: '/ky/person/management/getDetails',
        method: 'get',
        params,
        jy: true
    })
}

//获取导出模板 -- 导出科研人员列表中的某一个信息
export function getPersonInfo(personId) {
  return request({
    url: `/ky/person/management/getWord?personId=${personId}`,
    method: 'get',
    jy: true
  })
}
